package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderDetailMapper {
    /*
     * @Description  批量插入订单明细
     * @Param [orderDetails]
     * @return void
     **/
    void insertBatch(List<OrderDetail> orderDetails);

    /*
     * @Description  根据订单id查询订单明细
     * @Param [ordersId]
     * @return java.util.List<com.sky.entity.OrderDetail>
     **/
    @Select("select * from order_detail where order_id = #{ordersId}")
    List<OrderDetail> getByOrderId(Long ordersId);


}
